/*
 * Powered By [Seven]
 * Since 2016 - 2019
 */


package com.czmh.etc.onlinepubsys.model;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 *
 */
public class EtcCard extends BaseModel {
	
	//alias
	public static final String TABLE_ALIAS = "EtcCard";
	public static final String ALIAS_CARD_ID = "ETC卡id";
	public static final String ALIAS_USER_ID = "用户id";
	public static final String ALIAS_OBU_ID = "obu_id";
	public static final String ALIAS_CAR_NUM = "ETC卡绑定的车牌号";
	public static final String ALIAS_CARD_TYPE = "卡类型：22储值卡，23记账卡";
	public static final String ALIAS_USER_TYPE = "用户类型：0个人用户，1单位用户";
	public static final String ALIAS_CREATE_TIME = "create_time";
	public static final String ALIAS_UPDATE_TIME = "update_time";
	 
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	private String card_id;
	private String user_id;
	private String obu_id;
	private String car_num;
	private Integer card_type;
	private Integer user_type;
	private java.util.Date create_time;
	private java.util.Date update_time;
	//columns END

	public EtcCard(){
	}

	public EtcCard(
		String card_id
	){
		this.card_id = card_id;
	}

	/**  
	 * 设置ETC卡id  
	 * @param card_id ETC卡id  
	 */  
	public void setCard_id(String card_id) {
		this.card_id = card_id;
	}
	
	/**  
	 * 获取ETC卡id   
	 * @return card_id ETC卡id   
	 */
	public String getCard_id() {
		return this.card_id;
	}
	/**  
	 * 设置用户id  
	 * @param user_id 用户id  
	 */  
	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}
	
	/**  
	 * 获取用户id   
	 * @return user_id 用户id   
	 */
	public String getUser_id() {
		return this.user_id;
	}

	public String getObu_id() {
		return obu_id;
	}

	public void setObu_id(String obu_id) {
		this.obu_id = obu_id;
	}

	/**
	 * 设置ETC卡绑定的车牌号  
	 * @param car_num ETC卡绑定的车牌号  
	 */  
	public void setCar_num(String car_num) {
		this.car_num = car_num;
	}
	
	/**  
	 * 获取ETC卡绑定的车牌号   
	 * @return car_num ETC卡绑定的车牌号   
	 */
	public String getCar_num() {
		return this.car_num;
	}
	/**  
	 * 设置卡类型：22储值卡，23记账卡  
	 * @param card_type 卡类型：22储值卡，23记账卡  
	 */  
	public void setCard_type(Integer card_type) {
		this.card_type = card_type;
	}
	
	/**  
	 * 获取卡类型：22储值卡，23记账卡   
	 * @return card_type 卡类型：22储值卡，23记账卡   
	 */
	public Integer getCard_type() {
		return this.card_type;
	}
	/**  
	 * 设置用户类型：0个人用户，1单位用户  
	 * @param user_type 用户类型：0个人用户，1单位用户  
	 */  
	public void setUser_type(Integer user_type) {
		this.user_type = user_type;
	}
	
	/**  
	 * 获取用户类型：0个人用户，1单位用户   
	 * @return user_type 用户类型：0个人用户，1单位用户   
	 */
	public Integer getUser_type() {
		return this.user_type;
	}
	/**  
	 * 设置create_time  
	 * @param create_time create_time  
	 */  
	public void setCreate_time(java.util.Date create_time) {
		this.create_time = create_time;
	}
	
	/**  
	 * 获取create_time   
	 * @return create_time create_time   
	 */
	public java.util.Date getCreate_time() {
		return this.create_time;
	}
	/**  
	 * 设置update_time  
	 * @param update_time update_time  
	 */  
	public void setUpdate_time(java.util.Date update_time) {
		this.update_time = update_time;
	}
	
	/**  
	 * 获取update_time   
	 * @return update_time update_time   
	 */
	public java.util.Date getUpdate_time() {
		return this.update_time;
	}

	@Override
    public int hashCode() {
		return new HashCodeBuilder()
			.append(getCard_id())
			.toHashCode();
	}
	
	@Override
    public boolean equals(Object obj) {
		if(obj instanceof EtcCard == false) {
			return false;
		}
		if(this == obj) {
			return true;
		}
		EtcCard other = (EtcCard)obj;
		return new EqualsBuilder()
			.append(getCard_id(),other.getCard_id())
			.isEquals();
	}
}

